<html>
<head><meta charset="utf-8"><title>Reading · project-error-handling · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/index.html">project-error-handling</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html">Reading</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="226994008"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/226994008" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#226994008">(Feb 19 2021 at 17:00)</a>:</h4>
<p><span class="user-mention" data-user-id="300743">@Sean Chen</span> finally had a chance to read <a href="https://msirringhaus.github.io/Where-everything-went-wrong/">https://msirringhaus.github.io/Where-everything-went-wrong/</a></p>



<a name="226994028"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/226994028" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#226994028">(Feb 19 2021 at 17:01)</a>:</h4>
<p>i think I'm going to do a blog post</p>



<a name="226994075"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/226994075" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#226994075">(Feb 19 2021 at 17:01)</a>:</h4>
<p>to follow up your blog post and go into more details on the reporting stuff in particular</p>



<a name="227005974"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/227005974" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#227005974">(Feb 19 2021 at 18:24)</a>:</h4>
<p>another article that mentions error handling: <a href="https://blog.kraken.com/post/7964/oxidizing-kraken/">https://blog.kraken.com/post/7964/oxidizing-kraken/</a></p>



<a name="227005981"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/227005981" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#227005981">(Feb 19 2021 at 18:24)</a>:</h4>
<p>only briefly though</p>



<a name="227005997"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/227005997" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#227005997">(Feb 19 2021 at 18:24)</a>:</h4>
<blockquote>
<p>Ideally, each fallible function would have its own error enum to precisely capture its errors and handle them, but in practice it is too verbose and leads to using the less precise Error trait or one enum per module. The language could support this better: there are several initiatives and macros exploring this.</p>
</blockquote>



<a name="227100959"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/227100959" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#227100959">(Feb 20 2021 at 16:08)</a>:</h4>
<p><span class="user-mention" data-user-id="220273">@Jane Lusby</span> did you get anything finalized?</p>



<a name="227101135"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/227101135" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#227101135">(Feb 20 2021 at 16:11)</a>:</h4>
<p>For the blog post? Not yet</p>



<a name="227101154"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/227101154" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#227101154">(Feb 20 2021 at 16:11)</a>:</h4>
<p>Ended up having too much to do yesterday</p>



<a name="227104892"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/227104892" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#227104892">(Feb 20 2021 at 17:17)</a>:</h4>
<p>sure, let me know if you wanna collab on it</p>



<a name="227107118"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/227107118" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#227107118">(Feb 20 2021 at 17:58)</a>:</h4>
<p>I'll send you the draft once I've got it finished</p>



<a name="227107122"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/227107122" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#227107122">(Feb 20 2021 at 17:58)</a>:</h4>
<p>But I have a pretty good idea of what I want to say in the article</p>



<a name="227107124"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/227107124" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#227107124">(Feb 20 2021 at 17:58)</a>:</h4>
<p>Blog post same thing whatever</p>



<a name="227361707"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/227361707" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#227361707">(Feb 23 2021 at 00:10)</a>:</h4>
<p>starting to work on the blog post now</p>



<a name="227361711"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/227361711" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#227361711">(Feb 23 2021 at 00:10)</a>:</h4>
<p><a href="https://hackmd.io/@rust-libs/B1wYs2WGO">https://hackmd.io/@rust-libs/B1wYs2WGO</a> is where I'm drafting it</p>



<a name="227361714"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/227361714" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#227361714">(Feb 23 2021 at 00:10)</a>:</h4>
<p>its still extremely rough and early</p>



<a name="227361816"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/227361816" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#227361816">(Feb 23 2021 at 00:11)</a>:</h4>
<p>but one thing that came to mind that is probably relevant to you <span class="user-mention" data-user-id="300743">@Sean Chen</span></p>



<a name="227361827"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/227361827" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#227361827">(Feb 23 2021 at 00:11)</a>:</h4>
<p>is that once we integrate the error trait with the panic runtime</p>



<a name="227361895"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/227361895" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#227361895">(Feb 23 2021 at 00:12)</a>:</h4>
<p>we will probably want to intentionally disallow runtime handling of error payloads</p>



<a name="227361932"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/227361932" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#227361932">(Feb 23 2021 at 00:12)</a>:</h4>
<p>the worry being that we don't want people using <code>catch_unwind</code> and downcast the <code>dyn Error</code> type and use it to actually propagate error types</p>



<a name="227362099"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/227362099" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#227362099">(Feb 23 2021 at 00:14)</a>:</h4>
<p>probably worth surveying people who use that API and see what people do with the payload from <code>catch_unwind</code> if anything</p>



<a name="227368925"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/227368925" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#227368925">(Feb 23 2021 at 01:25)</a>:</h4>
<p>I expect you'll find it's used most at ABI boundaries, since unwinding between Rust and C is UB</p>



<a name="227369073"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/227369073" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#227369073">(Feb 23 2021 at 01:26)</a>:</h4>
<p>I use it at work to resume a panic after the C code returns: <a href="https://gitlab.com/YottaDB/Lang/YDBRust/-/blob/master/src/simple_api/mod.rs#L1403">https://gitlab.com/YottaDB/Lang/YDBRust/-/blob/master/src/simple_api/mod.rs#L1403</a>, <a href="https://gitlab.com/YottaDB/Lang/YDBRust/-/blob/master/src/simple_api/mod.rs#L1580">https://gitlab.com/YottaDB/Lang/YDBRust/-/blob/master/src/simple_api/mod.rs#L1580</a></p>



<a name="227371503"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/227371503" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#227371503">(Feb 23 2021 at 01:59)</a>:</h4>
<p>An error would be nice, since as is you end up doing stuff like <a href="https://github.com/mozilla/ffi-support/blob/main/src/error.rs#L258-L269">https://github.com/mozilla/ffi-support/blob/main/src/error.rs#L258-L269</a></p>



<a name="227454090"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/227454090" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#227454090">(Feb 23 2021 at 16:01)</a>:</h4>
<p><span class="user-mention" data-user-id="232545">@Joshua Nelson</span> I guess I mean more specifically if anyone is doing anything with the payload after panicking other than re propagating it</p>



<a name="227454137"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/227454137" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#227454137">(Feb 23 2021 at 16:01)</a>:</h4>
<p>Which it doesn't look like you are</p>



<a name="227454173"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/227454173" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#227454173">(Feb 23 2021 at 16:01)</a>:</h4>
<p>Which is cool and perfect</p>



<a name="227454468"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/227454468" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#227454468">(Feb 23 2021 at 16:02)</a>:</h4>
<p>And validates my theory that there's not really many good uses to the payload after a panic starts unwinding because it's already been reported</p>



<a name="235120370"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/235120370" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cam Cope <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#235120370">(Apr 19 2021 at 02:41)</a>:</h4>
<p>This post helped me understand why you can't just have a function return Result&lt;T, impl std::error::Error&gt; <a href="https://fasterthanli.me/articles/whats-in-the-box">https://fasterthanli.me/articles/whats-in-the-box</a></p>



<a name="235120827"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/235120827" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cam Cope <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#235120827">(Apr 19 2021 at 02:51)</a>:</h4>
<p>Though it does make me wish the compiler could just... walk the stack of functions that are called and calculate the max size, or something. But I think you guys already have some plans in the works for more ergonomic error handling, and it's probably more elegant/feasible</p>



<a name="235120905"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/235120905" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cam Cope <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#235120905">(Apr 19 2021 at 02:52)</a>:</h4>
<p>The article might be a good source to borrow from when documenting the mechanics and limitations of handling errors generically though</p>



<a name="235224522"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/235224522" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#235224522">(Apr 19 2021 at 18:13)</a>:</h4>
<p>we don't have any specific changes yet in mind atm for improving ergonomics for defining error types, so proposals are definitely welcome. The one you've just described sounds similar to anon enums or some DST related ideas I've heard, but I don't think any of those ideas have had a successful RFC yet</p>



<a name="235224586"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/235224586" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#235224586">(Apr 19 2021 at 18:13)</a>:</h4>
<p>and ty for linking that blog post, I'll be sure to check it out</p>



<a name="235224660"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/235224660" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#235224660">(Apr 19 2021 at 18:14)</a>:</h4>
<p>and ill add it to the prior art issue for the book</p>



<a name="235225537"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Reading/near/235225537" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Reading.html#235225537">(Apr 19 2021 at 18:20)</a>:</h4>
<p><span class="user-mention silent" data-user-id="220273">Jane Lusby</span> <a href="#narrow/stream/257204-project-error-handling/topic/Reading/near/235224586">said</a>:</p>
<blockquote>
<p>and ty for linking that blog post, I'll be sure to check it out</p>
</blockquote>
<p>everything by amos is top-tier, highly recommend</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>